﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BookModel;
using System.Data.SqlClient;

namespace DAL
{
    
    //管理员权限表
    public class AdminlimitsDAL
    {
        public List<Adminlimits> GetAdminLimits()
        {
            List<Adminlimits> LAI = new List<Adminlimits>();
            string sql = "select *from Adminlimits";
            if (SQLHelp.OpenConn())
            {
                SqlDataReader sdr = SQLHelp.ExecReader(sql);
                if (sdr != null)
                {
                    while (sdr.Read())
                    {
                        LAI.Add(new Adminlimits
                        {
                            AdminlimitsID = (int)sdr["AdminlimitsID"],
                            AdminlimitsName=sdr["AdminlimitsName"] as string,
                            Remark = sdr["Remark"] as string
                        });
                    }
                }
                SQLHelp.CloseConn();
            }
            return LAI;
        }
    }
}
